<!-- 新闻列表 -->
<script lang="ts">
export default {
  name: "jfNewsList",
};
</script>
<template>
  <div class="page-box h100 display-flex czbj">
    <div>
      <dxtable :dataJson="dataJson" :formJson="formJson" :portUrl="portUrl" :qx="qx" ref="databale">
      </dxtable>
    </div>
  </div>
</template>
<script lang='ts' setup>
import dxtable from "../../components/util/dxtable.vue";
import { NImage } from "naive-ui";
import videoViewing from "../../components/util/videoViewing.vue";
import sort from "../../components/util/sort.vue";
import { dxget, dxpost, qurl, hf } from "../../util/index";

import { h, ref, reactive } from "vue";
const databale = ref()
const initeer = () => {
  databale.value.initDataExpose();
};
let dataJson = reactive([
  {
    title: "标题",
    key: "title",
    search: true, // 是否在搜索栏展示
    ellipsis: {
      tooltip: true
    }
  },
  {
    title: "封面",
    key: "cover",
    width: 120,
    render(row) {
      return h(NImage, { src: row.cover, "class": "jfimg imgjz cz" })
    }
  }, {
    title: "新闻地址",
    key: "videoUrl",
    width: 120,
    render(row) {
      return h("a", { href: row.url,class:"ls",target:"_blank" }, "点击跳转")
    }
  },
  {
    title: "排序",
    width: 100,
    render(row) {
      row.databaseName = "jfNewsList";
      return h(sort, {
        row,
        onCallBack: () => {
          initeer();
        },
      });
    },
  },
  {
    title: "修改时间",
    key: "addTime",
    width: "200",
    type: "daterange",
  },
]);
let portUrl = "studyAbroad/jfNewsList";
const qx = {
  DeletePermissionID: "jfNewsListdel", //删除
  EditPermissionIdentifier: "jfNewsListbj", // 编辑
  NewPermissionIdentifier: "jfNewsListxz", // 新建
  ViewPermissionID: "jfNewsListck", // 查看
};


let formJson = reactive([
  {
    title: "标题",
    key: "title",
    type: "input",
    span:"24",
    required: true, 
  },
  {
    title: "封面",
    key: "cover",
    type: "img",
    val: '',
    required: true, 
  },
  {
    title: "新闻地址",
    key: "url",
    type: "input",
    span:"24",
    required: true, 
  },
])

</script>
  
  
  